package com.kaifamiao.statics;

import java.util.Arrays;
import java.util.Set;

public class StringStaticTest2 {

	public static void main(String[] args) {
		
		CharSequence delimiter = "," ;
		
		// join 是 JDK 1.8 新增的类方法
		String s = String.join( delimiter , "赵威" , "姜禹志" , "曾子豪");
		System.out.println( s );
		
		Set<CharSequence> set = Set.of( "莫雨峰" , "樊志强" , "范一波");
		System.out.println( set );
		
		String x = String.join( "::" , set );
		System.out.println( x );
		
		// 注意 split 是实例方法
		String[] names = x.split( "::" ) ;
		System.out.println( Arrays.toString( names ) );

	}

}
